using System;
using FytSoa.Common.Utils;
using System.ComponentModel.DataAnnotations;
using FytSoa.Application.Hr;
using SqlSugar;

namespace FytSoa.Application.Crm;

/// <summary>
/// 项目-阶段
/// </summary>
public class CrmProjectStageDto : AppEntity
{
    /// <summary>
    /// 项目编号
    /// </summary>
    public long ProjectId { get; set; } = 0;

    /// <summary>
    /// 阶段名称
    /// </summary>
    [Required]
    [StringLength(50)]
    public string Name { get; set; }

    /// <summary>
    /// 阶段负责人
    /// </summary>
    public long EmployeeId { get; set; } = 0;

    /// <summary>
    /// 负责人
    /// </summary>
    public HrEmployeeSimpleDto Employee { get; set; } = new();

    /// <summary>
    /// 阶段开始时间
    /// </summary>
    public DateTime? StartTime { get; set; }

    /// <summary>
    /// 阶段结束时间
    /// </summary>
    public DateTime? EndTime { get; set; }

    /// <summary>
    /// 备注
    /// </summary>
    public string Remark { get; set; }
    
    /// <summary>
    /// 阶段完成状态
    /// </summary>
    public bool Status { get; set; } = false;

    /// <summary>
    /// 创建人
    /// </summary>
    public string CreateUser { get; set; }

    /// <summary>
    /// 创建时间
    /// </summary>
    public DateTime CreateTime { get; set; } = DateTime.Now;

    /// <summary>
    /// 更新人
    /// </summary>
    public string UpdateUser { get; set; }

    /// <summary>
    /// 更新时间
    /// </summary>
    public DateTime? UpdateTime { get; set; }


}

public class CrmProjectStageSimpleDto : AppEntity
{
    /// <summary>
    /// 阶段名称
    /// </summary>
    public string Name { get; set; }
}